fixed try-catch