fixed minor bugs

Minor bugs as been fixed.