fixes after Sergey's review