Fixed brk bugs