Fixed new instance creating for php 5.4+