fix for max pw and min pw