FIX EVENT API AND JS