fix case sensitive to detect table for habtm