fix getting bytes