fix problems with ajax