fix rake to redefine pieces codes