Fixed overflow issue in parsing