Fixes some issues with variance checks