Fix for ajax requests