fixed a terrible terrible bug