Constructor changes and small bug fixed.