fix for php warnings