Build 4: Error handling fixes