Simplify and fix test