Error Handling fixes