fixed try/catch