Additional bug fixes