fixed workaround pow function