fixed bugs regarding measurement update function