Fixes tests and errors.