update Rakefile and fix test