fix ruby 1.9 compatibility bug, fix a bug that caused some content to be ignored