changed the setMax and setProgress method to better handle corner cases