fix to work in last measure