Fixed the return value in case the htlm could not be retrieved