fix bugs in new webapp binding code