Fixed tests and coverage