fix obvious bugs