Several fixes for reloading sections, thanks to @danthorpe. Fixes #310