do lots of changes

1. fix model bugs,
2. fix error message