fixed bug where incorrect number of features was being used to determine the piece rotation