Modified Master to prevent from 0 divide