Fix power of two check