fixed sql error
fixed comma bug in model
fixed comma bug in model --again