Fix rake tasks generator code