Bug fixes in minimax