Fix for large input