Fix ajax non-res issue