Fixed syntax error
Fix undefined index and added user ID to columns