Performance fixes in monitoring