fixed MAX_SIZE problem