Changes to try and help with the AJAX problem