Fix resistance calculation again