Everything is working correctly with AJAX