bug fix

Finally I did something useful.