remove MOBILE flag usage and correct isSame function logic