bridge support and minor fixes by Timur  Tuchkovenko