Fixes suggested by stof