added error handler for getCurrentPosition()