Fix pin dialog poping more than once