Addresses issues mentioned on e463eb35bc596d5973f782f2f04c8b6ccad97b3f