fixed a bug when switching to d-space and 2theta was zero