Fixed composite key bug + fixed undefined results.