Bug fixes

Fixed several process-related bugs