Fixed error with Python3 due to bytes type