# hey, not quite familiar with this construct but if do observe the alert being created before the function. you could try adding a dependOn something similar to alarm.node.addDependency(function);