A few changes to avoid JS errors