[URGENT] Fix buffer overruns