Changed usage of getBytes() to new bytes getter