Finally fixed issue withdocument.location="pebblejs://close" not being called