Strip strings before converting them to integers