Fixed bug where generic type was used instead of beanType