type bug fix