Fix bug on comparison