Bug fixes

Signed-off-by: Preetham MS <me@preetham.in>