Bug correction and type enhancement