Assig9 bugs fixed