bugfix: double check in SUB