Fixed usage of modulo operator