Fix slashes in strings, better buffer control in debug