Fixed some issues with generified classes