Some bugs fixeds