Adding fixes from pull Request