Changes in the am_manager and the corresponding tests