fixes #639 - withFrame() now switches back to parent frame instead of main one