fixed major sign bug. Fixed tests to correct the error