adding fault handling code
fixed some build errors