debugging. fixing minor issues