add better support for id column. Fixed #2