Issue/109 illegal argument exception

Fixes the crash for now, once we can reproduce we can explore further.

Note: This only happens when a local change could not be applied after applying a remote change, so should be pretty rare.