Fixed AJAX calls and errors inn python