Bugfix: correctly enable/disable function editor