Fixes suggested by Petr & JM