Change on the server

Change on the server. Now we can change A, W, k and ER to get an MTmin.
Fix some bugs

Fix some bugs when we change a smaller A.