Fixed problem closing measurements + test