Fixed statemonitor problem