Fix review comment and implemented a test