hopefully fixed a horrible bug