Fixed the problem with overflow