fixes suggested by sep and yonatan