section: sql & model fixes