Fixed HR problems, each instance now is generated by an IF statement