fixed messages loading bug