fixed a few bugs in headers php