result type bug fixed