fixes AJAX problem