Added location checking