plenty of bug fixes