More fixes on error cheking.