Few simple bugs fixed