Error Handling Fix