More Error Handling and small Fixes