Fixed issue with missing index initialization (thx to peter.z)