Revamped ability disabling code