Fix #555, wrap ajax call in setTimeout