Bug Fixes from code review