"Less than " condition not working