Fixed ajax issue and removed it