Made changes suggested by Osmose