fixed passing variables higher to parent window