a lot of small fixes from SCI 2013