Fix several issues with the `metaclasses` example