fix bug in when type help