Got generate html working properly