Small bugfix - if statement was wrong