Few bug fixes.

Signed-off-by: Apure Gupta <apurve@gotechy.in>