Add support for unions, bugfix for vectors