Minor fixes to ensure proper handling of potential function for
non-vanilla RMax