fixing compilation issue in apam