trying to fix String length bug