fix bug with db->table(id) resolve + add htaccess