Fix undefined isEnabled function