Fix minimum bug