fixed some invalidation issues