Replace onmessage instead of appending