Fix constant indexing