fix for base = 2