Couple bug fixes.. Not important to talk about.

Some other prep work for debugging later.