Fixing request insertion to DB. Fix DB asserts when open index.php for first time