Minor bugs fixed

Minor bugs fixed