Fixed obvious bugs;