corrected bad lengths and position