fixed STI error because of the type column