Updated code after PActor refactoring.
Fixed conflict.