fix undefined value