Fixed bad javascript