Fixes a bug in rake tasks