few bugs fixed