Fixed some tests

added handling for user defined types