Improve variable handling in workflow builder