added check to avoid warning errors