fixed overflow problem