bugfix: wrong if