Added extra safety check.