Refactor log,
fixing stacks