fix decoder generation for 2D populations
fix broken encoder generation for multi-dimensional inputs