Fix ajax problems