Fix issues disposing nested controls

See issues #140 and 141.