Fixed bug with averaging method selected