Fixing tests and addressing code review comment