Resolving Python3 bytes issue