hotfix: added if logic check