solved array out of bounds in guiCore