fix out of range exception in custom models name #2