Fixed error in one-off rake task