fixed error that my memory-saving 'trick' introduced