added extra check