Fixed plot_latent failure