[GIT PULL v1 7/7] stm class: Prevent division by zero