Fix Notice and Syntax error

Fix a notice in common.php