attempting to keep it from crashing, and debugging