Location crash fix