fixed a bug I though I fixed a while ago