fixed arraybug