series of bug fixes