fix calculation error mentioned by Franc
Remove useless debugging