Fix to scheduler rake task