fix to handle emoji characters