Fix numerous issues with AS deployment