Fixed possible overflow