Fix bug in remap class