apply daniel atallah's patch for 1.0 compatibility
Merge.