Update app.js

Must fix findFirstBAafterOne() to work no matter what.