Fixed bugs and Changed for Gradle