added update, fixed generate.php when generating -1 delay, now null