Fixing some errorhandling bugs