fix reading input margin