Fixes tests and lint errors