Fixed minor issue with new error handling