fix undefined logic