Fixing random crash - string buffer was defined as a constant rather than block of bytes