fixing obvious bugs