Fix tests and AMD bundling