fix undefined test