bugs fixed

Major jobs are bugs fixing