Follow improvements

Re-basing pull #808, because there where some compile problems introduced by #802