Fix possible NPE
Refactor the class and use a Proxy instead of dummy class