big embarassing bug fix