type recognition bugfix