Fixed an obscure bug