fixed bug in monitoring