fixed for ids out of range