Some changes to match the latest JSEngine