More fixes for b2g viewer.