fix buggy buggy code!