fix rakefile to stop tasks running twice