Fixed issues with code from match feedback