Corrected bug that removed too many charaters