fixed issue with errorTpl in core.php