Minor bugs fix!

Minor bugs fix!