Reading proper amount of bytes