code review fix __construct error