Fix #676 initialize context