Start of bug fixes