Fixed last obvious bugs