Fixed a wrongly sized buffer and removed a stopgap patch