added 'LIMIT 1' to UPDATE queries