fix bug in rake task