Fixed missing logic