fixed rake task to update legacy data