fixed a few loose ends