Fixing some excessive calculations