fix bug on project() when w != 1