Fixed buffer not being empty bug

Fixed a bug where the allocated buffer wouldn't be empty on creation.