Fixed a bug in AGS weights