Fixed bugs with milestone 2