Bug fixes

Signed-off-by: Simarpreet Singh <simar@linux.com>