fixed bugs with gradle build