fix return types of is_pow2 functions