fixed bug for AMP