Check the time delay to know the reason behind not turning off the light switch. If it is too long then set it a bit shorter and check the results. Even if it won’t turn off, then try to set the sensor to detect only motions within the room along with lower the sensitivity of the sensor.