Misc. bug fixes: As per Rahul Sir's comments on build 0.4