VAE modifications