Adding min bugfix