Minor bugs fixeds