bugfix: wrong check