Another really ugly fix that addresses the problem in the previous commit.