fixed some errors in model template