Fixed crash involved with accessing layers when GPS is not available.