#782, needs testing