Set appropriate attribute type for keys when creating table

Fix for #5