Fix bug in denormalize