changes for ruby 1.9 compatibility, might be more to come