Possible fix for PostgreSQL activity_type issue