Fix bug on refresh views and triggers generator