Fixes from js break in commit #328