BUGFIX: Threshold calculations now work correctly in tables