fix after_use hook handling, fix #1520