Topic: Dynamic XML generation ERROR

My gallery is generated by a php file from the tables in my database.
and i use it by passing different category names to the file. tiltviewer works fine for categories with more than 8 items in them but doesn't seem to load the gallery file when it has less than 8 items.

Any help appreciated!
Thanks in advance!