some bug fix
+ assign template
* fix db field select