Quickfix

Changed x and y buffers to double as they should be.