little logic fix