Made changes as recommended upstream