fix weak try-except blocks