javascript wont work fater rendder