Changed max(Space) to maxspace(Space)