some slight fixes to eliminate page flickers, and incorrect order of requests to server