Ajax was pointing to the wrong url