Fixes failing js unit tests