small fixes

Fixed the problem where it would select a different row when refreshing.
maybe fixed the problem where it would throw an exception when it
couldn't connect to PBW on refresh.