Fixes gradle bug and an internal bug