bug fixed, minor changes