get error functions working properly without mem errors