fix postMessage usage