Details: fix bugs