That seems strange to me. isForwardSelection should be already boolean, so this line could be simply
```
forwardSelection = isForwardSelection;
```
or?