Bugfixes to simplification