fix index return