Issue #660 - Pull request

...evious code was causing infinite loop of popup to ask user permission.