Fixed a bug where vertex array data was getting overwritten by creating a new buffer