Fixes for @dougt proposal