Fix various AMP issues