Clear rake tasks before redefining
No need to clear tasks

Partially revert 1db7aa07cd5bfe3f8ae967f2928a8392a98223bb