fix bug in voidBuffer()
flush buffer in Device constructor