fixed exception catching so it catches all of them