bug fix: correct feature generation based on the *next* action