Fix for minimax bug