Fixed bug with rake task