Sync onchange resolves #5

Resolves issue #5 .