small corrections for memory usage