Fixes for handling failure cases