fixed whole bunch of bugs in last commit. sorry weird shit got messed up
so make sure you pull this one