Fixed id is nil error