Several Bugs fixed...

Signed-off-by: robins gupta <robinskumar73@gmail.com>