some bug fixes.  Still buggy
minor fixes