correcting 2D bug