Fix and pass tests