Fixes to Ajax refresh support.