bugfix: logical error