Fix 'undefined displayed' bug