Minor bug fixes - still few bugs

Minor bug fixes - still few bugs