fix if blocks