metgoal logic not working in view