catch some errors