fix a bug in plug.  seems it only works with ruby 1.8?  test later