Bugfix: Missing error handling added