Fixed setting buffers
Primitives loading code