fix bug rending ifs