Bugfix: handling same bug as the last one, but in a different part of the
code