Auto generation bug