Bugfix with cached and buffered memory