Stored proc to fix monitor records