Little fixes to avoid php warnings