Fix NPE when setting a max Y above 127. PLUGIN-57

Signed-off-by: Ian Macalinao <ianmacalinao@gmail.com>