fixed fatal errors not getting catched