fixed bug in func_popr causing [1 4] [2 3 | ] to be calculated improperly