removing dem bytes