Ajax bug solved