fix a pretty sizeable exploit