Improve errorhandling
Fix