fix a horrible bug