fix bug where variance incorrect if transform applied