Added isAsync condition