fixed some small issues with the php file generation.