Basic fixes

Merging fixes added by @kastnerkyle and myself to master.