small fix moved reading from server