fixed bug in utils.signDim