fixing small issue with error storage in RAM