Merge branch 'master' of https://github.com/atlesn/P-star
Fixed else if blocks which actually did not work. Add test for this.