fix rendering calculation issue