fixed some ambiguity in the window onmessage handlers