Fix formatting errors; fix variance bug