Trim values that go beyond a length of 1024