try to handle some small errors