Fixes a NullPointerException in jsLocation