Making it work with latest changes