working on bugs in min-max (VBAT-53)