Fix #1577 hackishly