minor checks and fixes