Fix memory lack
Remove magic values