minor improvments errwhere