fix wi calculation