Fix Minor bugs