$scope is overriden in popup #2082