Solidity : View-function should not change state