Fix #1039