remove bad modal reference & scope var