fix exception when data is undefined
use custom configuration (but doesn't seem to work)