missing isInEditMode check was added