I have a problem with Property Manager Page

I'm building an add in that will need multiple PMP's. I used standard solidworks template with all PropertManagerPage2Handler. I used multiple page option to switch between PMP's using that. When I use that option it uses PMP handler OnNextPage. I tried creating new PMP and displaying it. Tried visibility with groups, and many more options. All the time I get an error: Object reference not set to an instance of an object.

I figured out that somewhere in in the handler I'm loosing connections to all interfaces. Basically I can't close PMP, change visibility of groups or anything within add in. When I used tab button i created it mostly works so I know that issue is within the handler.

It would be helpful if anybody could:

- point me to a problem(standard template )

-or/and have a working sample of code that utilizes multiple pmp's ( You would be my god)

-and/or explains how i should do this(I'm new to pmp's)

Thank You for taking time into reading this problem.

SolidworksApi macros