fix bugs, log actions