Fixed the call to potential function