Fixed dumb segfault on read from device buffer