critical fixes

Very strange you never saw this things, Mehran, and fixed them!!