[BUGFIX] Check for inserting and attaching sections