Fix #977