fix prevent possible access above array boardes