Added better mine grid detection