fixed mangled formatting and some callback syntax