Code cleanup, 1 minor bug fixed