First attempt to fix js errors