Handle some issues with undefiend values and setting