Fixed buffer overflow nonsense