fix mark_disabled function