Fix findbug issue and unit test