Preserving inputs cause several bugs - closed #23 #25 #26