Fix memory consumption

Signed-off-by: Nikita 'webconn' Maslov <wkernelteam@gmail.com>