fixed a issue with tileremove being and needing to be called when m == NULL