checked was not working right