fix memory size culc