fixed bunch of minor issues