just replacing dies with exit
fix the wpdb::prepare notice for the misused prepare statement