code cleanup: fixed PHP notices