fix small bug when html file is called directly