Fixed Minor bugs