Fixes failing jasmine tests