Minor bugs fixes.