Fixed offline mode for AJAX requests