Removed reload, made ajax query synchronous