Update to latest gradle, some bugfixes