fix array creation by allocating on heap. #85