frontend hook support & fix edge-case bug