(JAL-969) fix logic bug introduced during refactoring