Small bug fix in conditional statement
Merge branch 'chris/refinement-cleanup' into next