fixed checkLimit wrongly returns true if maxSize > used fixes #776