I think I've finally fixed this mess........