fix bug with __def