Fixed 'too many SQL variables' in log view and added filter to log view