Tons of bug fixes