Fixes ACL JavaScript code