Removed few bugs