Some fixes regarding minimax calculating