Fixing broken error check and adding some manual breakpoints.