fixed a bug that was killing me