constraint fixes for average