Do not use the remainder, use the modulo
Do not draw negative lengths