fixed imcomplete data
added error object check