fixed a shit ton of bugs