fix ajax timing