Fix the bug on validation by replacing the == by Long.equals()