Fix: global annotation, fixed bugs to satisfy ERC