Follow-up to fix for ticket #1166 (js fix)