change maplayer recycle logic