Updated min max function

Adds 'and' to if statements for checking for blocking