Some last minute error catching changes