Fixes errors in handling strings