fix logic mistake made on the spaces validation

#7