fix 2 small issues found by pycharm