Fix some issues about service exceptions