obvious bugs fixed