Fix outofbound shit