Fix the bug in _printEntry which makes it output incorrect results