avoid potential crash.