Fixed the bug in Outside

- Fixed a bug in outside and now it is working properly on any number of
iterations.
- The code was tested on 1500 sentences