XHR with callback works OK