fixed a few minor things in the core.