Fixing bug in percentage complete calculation