Work on #456, needs testing