Fixing a bug where annonymous functions would screw things up.