fixed nested ~ creation