fixing if for powerline