fixed php errors

This fixes some php errors that come in the error_log file.