Fixed crash-causing sync issue