Fix two bugs + fix tests