fixes initial loading and query