Fixed extptr to ptr template