Change line 63 from [:-1 to -1]