Fixed re-entrancy issues. Might lead to a minor performance dip, but we'll optimise that when it happens