Fixed try in a more robust way