Fixed check for ID