Fix percent id calculation