fixed adding of new variable from popup

Reviewer: Dan V.