partial ajax fix from Raman #3699 #3797