Removes superfluous return values
Corrects guard close condition