bug fixes and using VBOs