merge Ivan fixes