Last character is getting dropped