fixed error in error handling code FACEPALM