Fixed a bug in normalize()