Removed unnecessary location validity check in apply()