Added check to prevent warning