Merge "Add shortcut to avoid potential divide by zero in some case"