Fixed ajax issues