There seems to be an issue with the ajax call.

I made some changes but im not sure if they will work