Fix JavaScript bug, API is sent now.