small fixes suggested by JSLint