Fix input and formatting