Moved detection and repairing of slicing errors to a seperate sub to be called from both, regular and adaptive slicing algorithm