Fixes to const and es apis