Minor bug fixes
Minor bugs fixed.