Use $dbw since it's a master database

Change-Id: Iabfca566c03b9b368488bbbadbcfe4c2ed393062