Fixed possible code bug causing missing patch and upgrade jobs in crontab.