Fixed some bugs 10/12/2014
Fixed some bugs by Donet