Fixed a problem with the rake task

This actually fixes the problem I am encountering with the rake task.