Fixes as per Sergey review