fix undefined behaviour with string literals