Fix for php warnings