[Bugfix] Logic error