Fixed issue: Added missed mysql_query check