small fixes + create model from database draft

Signed-off-by: pussbb <pussbb@gmail.com>