Fix string length for callbacks