Fix a bug in cube initderivative