bugfixes and remove try-catch-block