Fixed Error Handling