Fix problematic ajax issue