Fix some issues on calc