use .- instead of bsxfun in var

This is a quick fix to one problem mentioned in #3486