Fixed a big complexity function