Fix bug tests (partially)