Added ascii color code filtering and fixed the query method