fixed a bug caused by php empty