cleaner gradle build and bugfix for #2