fix array size problem