fixed issue preventing avg working