fixed failing javascript unit tests