added more error handlers