Updated to make it work with the current version.