Small bug fixes..

Minor bugs fixed.