Added process state handling, custom for komax project, must find a way to extend