fixing js problems