Updated to make it work on current official version.