min function not working even on the template provided above.