fixed a hedious bug