small fixes suggested by JSHint