fix undefined value on tests