Fixed PHP issues