more bug fixes while I try to fix this darn thing.