fix bug preloading data