fixed a severe bug in `define`