finalise ticket locales + improve error handling

implemented stuff is insides explained inside commits.

maybe, let's see with him why this function have this strange behaviour.