fixed a bug in sign rule, and add debug print out in contractmSQS