fixed 2dcube.c