Complete bug fix