bug fixes for DTO generation