Fix ambient handling.