Robustified code.