Fix bug with rake tasks