I think there may be a bug in this code!