Fix registering of custom tasks via array