fixes exception in cronjob