fixed making rectangle for marking

Signed-off-by: Marfyy <martinsafsten@gmail.com>