Fixes for ZAS issues.

Fixes #2996
Fixes #3023