fixed bug where values could not be retrieved from memory