Minor fixes

Get rid of redundant calculations