fixed a bug on the definition of Y