fixed some minor issues according to PR comments