fixed a small bug that was causing trouble