Fixed a horribly embarrassing bug