Small bug-fixes and addition of error handing.