Prevent division-by-zero errors