fix errors on rake tasks