Fixed an error that could occur in new rake task.