Bug Fix: Fixed wrong test condition used