fixed some bugs, mostly in jason's stuff