Fixed #714 with a hack.