Minor bug fix

Due to a problem in the control flow. (I hope that was the problem)