bugfixes, emulate brk system call