Fixed column calculation bug