Fixed an elusive bug