just a port of AS7-6031 to 7.1 branch