Fixed crash-causing sync issue

See #88.