Small modification, and redundant code removed