Minor bugs removed