Index error finally fixed. closes #15