fixed a small bug introduced for code