Bug fix from Eli and Jonathon
Bug fix from Eli and Jonathon