bug fixes mainly